import "../css/index.css";
import "../css/component.less";
import img from '../img/zznh.png'

function component() {
  const element = document.createElement("div");
  element.innerHTML = "hello webpack";
  element.className = "content";

  const imgEL = new Image()
  // imgEL.src = require('../img/zznh.png').default
  imgEL.src = img
  element.appendChild(imgEL)

  const bgDivEl = document.createElement('div')
  bgDivEl.style.width = 200 + 'px'
  bgDivEl.style.height = 200 + 'px'
  bgDivEl.className = 'bg-image';
  bgDivEl.style.backgroundColor = 'pink'
  element.appendChild(bgDivEl)
  return element;
}
document.body.appendChild(component());
